// 构造函数练习
var pokerNumArr = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', '小王', '大王'];
var pokerColorArr = ['♥', '♠', '♣', '♦'];
/**
 * 单张扑克牌构造函数
 * @param {number} num   1--A  2--2 .......11-J 12--Q 13 K  14 小王 15 大王
 * @param {number} color 1红桃 2黑桃 3梅花 4方片
 */
function Poker(num, color) {
  this.num = num;
  this.color = color;
  this.print = function () {
    var pNum = pokerNumArr[num - 1];
    if (num > 13) {
      console.log(pNum);
      return;
    }
    var pColor = pokerColorArr[color - 1];
    console.log(pColor + '' + pNum);
  };
}

function Deck() {
 this.print=function(){
    var pokers = [];
    for (let i = 1; i <= 13; i++) {
      for (let j = 1; j <= 4; j++) {
        var pk = new Poker(i, j);
        pokers.push(pk);
      }
    }
    pokers.push(new Poker(14,1));
    pokers.push(new Poker(15,1));

    array.forEach(element => {
        
    });
 }


}

var poker1 = new Poker(14, 4);
poker1.print();
